# This file is part of BlackArch Linux ( https://www.blackarch.org/ ).
# See COPYING for license details.

pkgname=python-dsinternals
_pkgname=dsinternals
pkgver=1.2.4
_pyver=3.13
pkgrel=9
pkgdesc='A Python native library containing necessary classes, functions and structures to interact with Windows Active Directory.'
arch=('any')
url='https://pypi.org/project/dsinternals/#files'
license=('GPL2')
depends=('python' 'python-pyopenssl' 'python-pycryptodomex')
makedepends=('python-setuptools')
source=("https://files.pythonhosted.org/packages/source/${_pkgname::1}/$_pkgname/$_pkgname-$pkgver.tar.gz")
sha512sums=('384bf1f9cbb524e02ae34c266b2ef6f2952e673674b75ee031e811cd6b098b25ef017ff5d8968bd63e37f9b11d7ca4660ce1cf9c5f23aafa6025254c4b0970a6')

build() {
  cd "$_pkgname-$pkgver"

  python setup.py build
}

package() {
  cd "$_pkgname-$pkgver"

  python setup.py install --root="$pkgdir" --prefix=/usr -O1 --skip-build

  rm -rf "$pkgdir/usr/lib/python$_pyver/site-packages/tests"
}

